package org.itboys.mobile.entity.mysql.wallet;

import com.fasterxml.jackson.annotation.JsonIgnore;
import org.itboys.mongodb.entity.BaseMySqlEntity;

import java.math.BigDecimal;
import java.util.List;

/**
 * 作者：zzq
 * 时间：2018/1/27
 * 描述：钱包
 */
public class CooWallet extends BaseMySqlEntity{
    private Long memberId;//用户Id
    private Long salesId;//推荐链   推荐人id
    private Long managerId;//业绩链  管理人Id
    private Integer memberLevel;//会员级别  1，普卡会员  2，银卡会员  3，金卡会员
    //private BigDecimal limitAmount;//可以提现额度
    private BigDecimal totalLimit;//总额度
    private BigDecimal ableLimit;//可用额度
    private BigDecimal totalAmount;//总金额
    private BigDecimal cashAmount;//现金金额
    private BigDecimal scoreAmount;//积分金额
    private BigDecimal frozenAmount;//每天释放的金额


    private BigDecimal totalAchievement;//总业绩
    private BigDecimal scale;//提成折扣;直接写入
    private Integer status;//钱包状态。用户状态变动；

    @JsonIgnore
    private String firstPath;//用户第一推荐人集合。实时读取
    @JsonIgnore
    private List<CooWallet> firstWallets;//用户第一推荐人集合。实时读取


    public CooWallet() {
    }

    public CooWallet(Long memberId) {
        this.memberId = memberId;
    }

    public Long getMemberId() {
        return memberId;
    }

    public void setMemberId(Long memberId) {
        this.memberId = memberId;
    }

    public Integer getMemberLevel() {
        return memberLevel;
    }

    public void setMemberLevel(Integer memberLevel) {
        this.memberLevel = memberLevel;
    }


    public BigDecimal getTotalAmount() {
        return totalAmount;
    }

    public void setTotalAmount(BigDecimal totalAmount) {
        this.totalAmount = totalAmount;
    }

    public BigDecimal getCashAmount() {
        return cashAmount;
    }

    public void setCashAmount(BigDecimal cashAmount) {
        this.cashAmount = cashAmount;
    }

    public BigDecimal getScoreAmount() {
        return scoreAmount;
    }

    public void setScoreAmount(BigDecimal scoreAmount) {
        this.scoreAmount = scoreAmount;
    }

    public BigDecimal getFrozenAmount() {
        return frozenAmount;
    }

    public void setFrozenAmount(BigDecimal frozenAmount) {
        this.frozenAmount = frozenAmount;
    }

    public BigDecimal getTotalAchievement() {
        return totalAchievement;
    }

    public void setTotalAchievement(BigDecimal totalAchievement) {
        this.totalAchievement = totalAchievement;
    }

    public BigDecimal getScale() {
        return scale;
    }

    public void setScale(BigDecimal scale) {
        this.scale = scale;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getFirstPath() {
        return firstPath;
    }

    public void setFirstPath(String firstPath) {
        this.firstPath = firstPath;
    }

    public List<CooWallet> getFirstWallets() {
        return firstWallets;
    }

    public void setFirstWallets(List<CooWallet> firstWallets) {
        this.firstWallets = firstWallets;
    }

    public Long getSalesId() {
        return salesId;
    }

    public void setSalesId(Long salesId) {
        this.salesId = salesId;
    }

    public Long getManagerId() {
        return managerId;
    }

    public void setManagerId(Long managerId) {
        this.managerId = managerId;
    }

    public BigDecimal getTotalLimit() {
        return totalLimit;
    }

    public void setTotalLimit(BigDecimal totalLimit) {
        this.totalLimit = totalLimit;
    }

    public BigDecimal getAbleLimit() {
        return ableLimit;
    }

    public void setAbleLimit(BigDecimal ableLimit) {
        this.ableLimit = ableLimit;
    }

    public String  getMemberLevelStr(){
        String memberLevelStr="";
        if(memberLevel==null)return memberLevelStr;
        switch (memberLevel) {
            case 1:
                memberLevelStr="普卡会员";
                break;
            case 2:
                memberLevelStr="银卡会员";
                break;
            case 3:
                memberLevelStr="金卡会员";
                break;
            default:
                break;
        }
        return memberLevelStr;
    }
}
